package cn.jinjimi.domain.data.net;

import cn.jinjimi.domain.data.dto.PosterForShareDto;
import cn.jinjimi.domain.data.dto.PosterTemplateDto;
import cn.jinjimi.domain.data.dto.PostersInfoDto;
import cn.jinjimi.app.poster.bean.PosterMarkDto;

import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;

/**
 * Created by lforxeverc on 16/9/27.
 */

public interface PosterService {
    @GET("/apps/posters/templates/categories")
    Call<PosterTemplateDto> fetchTemplatesCategories(@QueryMap Map<String, Object> parentCode);

    @GET("/apps/posters/templates")
    Call<PostersInfoDto> fetchPosterTemplates(@QueryMap Map<String, Object> map);

    @PUT("/apps/posters/templates/{id}")
    Call<Void> sendShareTemplate(@Path("id") int templateId);

    @POST("/apps/posters")
    @FormUrlEncoded
    Call<PosterForShareDto> fetchPosterShareMsg(@FieldMap Map<String, Object> maps);

    @POST("/apps/posters/{template_id}/watermarks")
    @FormUrlEncoded
    Call<PosterMarkDto> fetchPosterMarkInfo(@Path("template_id") int templateId, @Field("force_refresh") boolean forceRefresh);

}
